Vercel
API ReferenceChats

Get Chat Files

Returns the source files for a chat.

GET/v2/chats/{chatId}/files

Usage

TypeScript Example
import { v0 } from 'v0-sdk'const result = await v0.chats.getFiles({  chatId: 'chat_abc123',})console.log(result)

API Signature

Request

Path Parameters

chatId: string

The unique identifier of the chat.

Response

files: object[]

All source files in the chat.

path: string

Project-relative file path, e.g. "app/page.tsx".

content: string

Content of the file.

encoding: 'utf8' | 'base64'

How content is encoded. utf8 for text files; base64 for binary files.

On this page